#include <iostream>

int size(void)
{
    return 233;
}

void decltype_func()
{
    decltype(size()) sum;

    const int ci = 0, &cj = ci;

    decltype(ci) x = 0;
    decltype(cj) y = x;

    std::cout << cj << " " << y << std::endl;
}

void decltype_func2()
{
    int i = 42, *p = &i, &r = i;
    decltype(r) b1 = i;
    decltype(r + 0) b2;
    std::cout << p << ": " << *p << " " << r << std::endl;
    std::cout << b1 << std::endl;
    std::cout << b2 << std::endl;

    decltype(*p) c = b2;
}

int main()
{
    decltype_func2();
    return 0;
}